import createjs from "createjs-ts";
import cjs=createjs
import { GameConfig } from "../Const";
export default class BaseView extends cjs.Container {
  constructor() {
    super();
  }
  /**
   * 获取preload加载的资源
   * @param id 资源id
   * @param bundle 分bundle名称，默认default
   * @returns 
   */
  protected getResource(id:string,bundle='default'):any{
    let loader
    switch(bundle){
        case 'default':
            loader=GameConfig.defaultLoader
            break
    }
    return loader.getResult(id)
  }

  protected get width():number{
    return GameConfig.visibleWidth
  }
  protected get height():number{
    return GameConfig.visibleHeight
  }
}